<template>
    <section class="jumbotron">
        <h3 class="jumbotron-heading">Search Github Users</h3>
        <div>
            <input type="text" placeholder="enter the name you search" v-model="searchName" />&nbsp;
            <button @click="handleClick">Search</button>
        </div>
    </section>
</template>
<script>
export default {
    name: "SearchList",
    data() { 
        return {
            searchName: ""
        }
    },
    methods: {
        handleClick() { 
            if (!this.searchName) { 
                return;
            }
            this.$bus.$emit("search", this.searchName);
        }
    }
}
</script>
<style>

</style>